import request from '/@/utils/request'
import {prefix} from '/@/api/oa'

/**
 * 职级分页数据
 */
export function getGradePage(params: object) {
    return request({
        url: prefix + '/officeGrade/getPage',
        method: 'get',
        params
    })
}

/**
 * 新增职级
 */
export function createGrade(data: object) {
    return request({
        url: prefix + '/officeGrade/create',
        method: 'post',
        data
    })
}

/**
 * 编辑职级
 */
export function editGrade(data: object) {
    return request({
        url: prefix + '/officeGrade/edit',
        method: 'post',
        data
    })
}

/**
 * 删除职级
 */
export function deleteGrade(data: object) {
    return  request({
        url: prefix + '/officeGrade/delete',
        method: 'post',
        data
    })
}

/**
 * 选择器数据
 */
export function gradeSelector() {
    return request({
        url: prefix + '/officeGrade/selector',
        method: 'get'
    })
}
